package com.ksvip.next.components.core.bean;

import java.util.Collection;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class MultiResult<T> extends Result<Collection<T>> {

    private static final long serialVersionUID = -1412666050842956458L;

    public MultiResult() {
        super();
    }

    public static <T> MultiResult fail(String respCode, String respMsg) {
        MultiResult<T> r = new MultiResult<>();
        r.respCode = respCode;
        r.respMsg = respMsg;
        return r;
    }

    public static <T> MultiResult<T> data(Collection<T> data) {
        MultiResult<T> r = new MultiResult<>();
        r.result = data;
        return r;
    }

}
